#include <stdio.h>

int main_23()
{
    int n,cnt=0;
    scanf("%d",&n);
    printf("%d\n",n/50*7+n%50/30*4+n%50%30/10);
	return 0;
}
